package xyz.yolin.dao;

import org.apache.ibatis.annotations.Param;
import xyz.yolin.pojo.Books;
import xyz.yolin.pojo.User;

import java.util.List;

public interface BookMapper {
    //增加一本书
    int addBook(Books books);

    //删除一本书
    int deleteBook(int id);

    //更新一本书
    int updateBook(Books book);

    //查询一本书
    Books queryBook(@Param("bookId") int id);

    //查询全部的书
    List<Books> queryAllBook();

    //根据书名查询图书
    List<Books> queryBookByName(String bookName);

    //查询用户账号密码
    User checkLogin(String username);
}
